using System.Collections.Generic;
using System.Data;
using OneDayModel.Interfaces;

namespace OneDayModel.DBRepository
{
    public class DbRole : IRole
    {
        private bool isPublic;
        private string name;

        public DbRole(IDataReader dataReader)
        {
            isPublic = dataReader.GetBoolean(3);
            name = dataReader.GetString(2);
        }

        public bool Public
        {
            get { return isPublic; }
        }

        public string Name
        {
            get { return name; }
        }

        public string Parent
        {
            get { throw new System.NotImplementedException(); }
        }

        public IEnumerable<IRoleAttribute> Attributes
        {
            get { throw new System.NotImplementedException(); }
        }

        public IEnumerable<IRoleAttribute> GetRequiredAttributes()
        {
            throw new System.NotImplementedException();
        }
    }
}